﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VOL.Entity.DomainModels.WorkforceManage
{
    [Table("Nurse")]
    public class Nurse
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        [StringLength(50)]
        public string NurseCode { get; set; }

        public int? Sex { get; set; }  // 允许空值

        [Required]
        [StringLength(30)]
        [Column("Name")] // 映射 SQL 保留字
        public string Name { get; set; }

        [Required]
        [StringLength(20)]
        public string Professional { get; set; }

        [Required]
        [StringLength(20)]
        public string IDNo { get; set; }

        [Required]
        [StringLength(20)]
        public string Phone { get; set; }

        [Required]
        [StringLength(100)]
        [Column("Address")] // 映射 SQL 保留字
        public string Address { get; set; }

        [Required]
        [StringLength(20)]
        [Column("SOSName")] // 保持 SQL 列名
        public string SOSName { get; set; }
    }
}
